#include <iostream>
#include <vector>
using namespace std;

class Solution {
    public:
	int countNumbersWithUniqueDigits(int n)
	{
                if (n == 0) return 1;

                int ans = 10;
                for(int i = 2, pre = 9, cur = 9;i <= n; i++){
                    pre *= cur;
                    cur--;
                    ans += pre;
                }
                return ans;
	}
};

int main()
{
        int n = 2;;
        cout << Solution().countNumbersWithUniqueDigits(n) << endl;
	return 0;
}